<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>收货地址</title>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/common.css"/>
    
    <style type="text/css">
        body {
            font-size: 14px;
            background: #f3f3f3;
        }
        .aui-list-view{
            background:  #f3f3f3;
        }
        .contain{
        }
        .menuRgiht{
            float: right;
            margin-right:20px;
        }
        .aui-list-view i.aui-iconfont{
            color:#000;
        }
        .addressTop,.addressCenter{
            padding: 3px 0;
        }
        .addressCenter{
            padding-bottom: 10px; 
        }
        .aui-radio{
            width: 18px;
            height: 18px;
            margin: 0;
        }
        .aui-radio:checked:before, .aui-radio.aui-checked:before{
            content:"";
        }
        .aui-radio:checked:after, .aui-radio.aui-checked:after{
            left: 0;
            top: -4px;
        }
        .aui-radio:checked, .aui-radio.aui-checked{
            background-color: #327afa;
            border: solid 1px #327afa;
        }
        .aui-list-view i.aui-iconfont{
            margin-right: -2px;
        }
        .addressBottom{
            padding:8px 0 ;
            overflow: hidden;
        }
         .aui-border-b:after{
            right: -120%;
            left: -15px;
         }
         .aui-radio-name{
            height: 18px;
            line-height: 18px;
            margin: 0;
            margin-left: 5px;
         }
         .defaultAddress{
            color:#327afa;
         }
         .aui-list-view-cell{
            padding-bottom: 0;
            margin-bottom: 10px;
            background: #fff;
         }
         .edit{
            margin-right: 10px;
         }
    </style>
</head>
<body>
<div class="contain">
         <ul class="aui-list-view">
            <li class="aui-list-view-cell" >
                <div class="addressTop">
                    <span class="userName">刘小姐</span>
                    <span class="userPhone aui-pull-right">123456789101</span>
                </div>
                <div class="addressCenter aui-border-b">
                    <span>收货地址：</span>
                    <span>广东省广州市天河区广东省广州市天河区中区广东省广州市天河区中石化大厦B座6028</span>
                </div>
                <div class="addressBottom ">
                    <!-- defaultAddress为默认地址样式 -->
                    <span class="status defaultAddress">
                        <input class="aui-radio" type="radio" name="demo1" checked   tapmode onclick="setDefault(this)">
                        <div class="aui-radio-name">默认地址</div>
                    </span>
                    <span class="dele aui-pull-right"> <i class="aui-iconfont aui-icon-delete"></i>删除</span>
                    <span class="edit aui-pull-right"   tapmode onclick="openToTwo('addressEdit')"> <i class="aui-iconfont aui-icon-edit"></i>编辑</span>
                </div>
            </li>
            <li class="aui-list-view-cell" >
                <div class="addressTop">
                    <span class="userName">刘小姐</span>
                    <span class="userPhone aui-pull-right">123456789101</span>
                </div>
                <div class="addressCenter aui-border-b">
                    <span>收货地址：</span>
                    <span>广东省广州市天河区广东省广州市天河区中石化大厦B座6028</span>
                </div>
                <div class="addressBottom ">
                    <span class="status ">
                        <input class="aui-radio" type="radio" name="demo1"   tapmode onclick="setDefault(this)">
                        <div class="aui-radio-name">设为默认</div>
                    </span>
                    <span class="dele aui-pull-right"> <i class="aui-iconfont aui-icon-delete"></i>删除</span>
                    <span class="edit aui-pull-right"   tapmode onclick="openToTwo('addressEdit')"> <i class="aui-iconfont aui-icon-edit"></i>编辑</span>
                </div>
            </li>
            
         </ul>
     </div>

</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="../../script/myInfo.js"></script>
<script type="text/javascript" src="../../script/doT.min.js"></script>
<script type="text/javascript" src="../../script/echo.js"></script>
<script type="text/javascript" src="../../script/jquery-1.11.3.js"></script>
<script type="text/javascript">
    apiready = function () {
        api.parseTapmode();
    }
    //设置默认地址
    function setDefault(obj){
        if($(obj).parent().hasClass("defaultAddress")){
            // 单击的是默认地址
            return;
        }else{
            // 设置为默认
            $(".contain").find("input[type='radio']").each(function(){
                $(this).parent().removeClass("defaultAddress");
                $(this).parent().find(".aui-radio-name").text("设为默认");
            })
            $(obj).parent().addClass("defaultAddress");
            $(obj).parent().find(".aui-radio-name").text("默认地址");
        }
    }
</script>
</html>